package com.example.myservlet;

import com.example.anno.RequestMapping;
import com.example.init.XxljobUtil;
import com.example.xxljob.DemoJobHandler;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequestMapping("/xxljob")
public class XxljobTestServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
        test1();
    }

    private void test1() {
        XxljobUtil.regist("demoJobHandler", new DemoJobHandler());
        XxljobUtil.print();
    }

}